package com.kaikeba.service;

import com.kaikeba.bean.Courier;
import org.junit.Test;

import java.util.List;

import static org.junit.Assert.*;

public class CourierServiceTest {

    @Test
    public void console() {
        System.out.println(CourierService.console());
    }

    @Test
    public void findAll() {
        System.out.println(CourierService.findAll());
    }

    @Test
    public void testFindAll() {
        System.out.println(CourierService.findAll(true,0,1));
    }

    @Test
    public void findByCourierPhone() {
        System.out.println(CourierService.findByCourierPhone("19999999999"));
    }

    @Test
    public void add() {
        Courier courier = new Courier();
        courier.setCourierName("小红");
        courier.setCourierPhone("14444444444");
        courier.setNumber("444444444444444444");
        courier.setPassword("444444");
        System.out.println(CourierService.add(courier));
    }

    @Test
    public void updateById() {
        Courier courier = new Courier();
        courier.setId(1004);
        courier.setCourierName("小名");
        courier.setCourierPhone("14444444444");
        courier.setNumber("444444444444444444");
        courier.setPassword("666666");
        System.out.println(CourierService.updateById(courier));
    }

    @Test
    public void deleteByCourierPhone() {
        System.out.println(CourierService.deleteByCourierPhone("14444444444"));
    }

    @Test
    public void findCurierPhone(){
        System.out.println(CourierService.findCourierPhone());
    }
}